package com.husky.easyexcle.utils;

/**
 * @author huanfuan
 * @date 2023/5/28 11:05
 */
public class substringTest05 {

    public static void main(String[] args) {
        //java截取某个字符之前的字符串
        String str = "OGG_HIS_XFACE_SUB_ACCT_ADDNL_DTLS";
        String substring = "";
        if (str.contains("XFACE")){
            substring=str.replaceAll("XFACE","FACE");

        }
        System.out.println("截取_之前字符串:"+substring);
    }
}
